package edu.sctu.practice.class01.liangyuxiang.assign02;

/**
 * Created by 梁玉翔 on 2015/10/15.
 */
public class Rational {

    private double number1;
    private double number2;

    public Rational(double number1, double number2) {
        this.number1 = number1;
        this.number2 = number2;
    }

    public void addition() {
        double result;
        result = number1 + number2;
        System.out.println("两数和为:" + result);
    }

    public void subtration() {
        double result;
        result = number1 - number2;
        System.out.println("两数差为:" + result);
    }

    public void multiplication() {
        double result;
        result = number1 * number2;
        System.out.println("两数积为:" + result);
    }

    public void division() {
        double result;
        result = number1 % number2;
        System.out.println("两数除数为:" + result);
    }


}
